gtk_style_context_get_style_property
gtk_style_context_get_style_valist
gtk_style_context_get_valist
+gtk_style_context_get_section
gtk_style_context_get_color
gtk_style_context_get_background_color
gtk_style_context_get_border_color
gtk_style_context_get_path
gtk_style_context_get_property
gtk_style_context_get_screen
+gtk_style_context_get_section
gtk_style_context_get_state
gtk_style_context_get_style
gtk_style_context_get_style_property
}
}
+/**
+ * gtk_style_context_get_section:
+ * @context: a #GtkStyleContext
+ * @property: style property name
+ *
+ * Queries the location in the CSS where @property was defined for the
+ * current @context. Note that the state to be queried is taken from
+ * gtk_style_context_get_state().
+ *
+ * If the location is not available, %NULL will be returned. The
+ * location might not be available for various reasons, such as the
+ * property being overridden, @property not naming a supported CSS
+ * property or tracking of definitions being disabled for performance
+ * reasons.
+ *
+ * Shorthand CSS properties cannot be queried for a location and will
+ * always return %NULL.
+ *
+ * Returns: %NULL or the section where value was defined
+ **/
+GtkCssSection *
+gtk_style_context_get_section (GtkStyleContext *context,
+ const gchar *property)
+{
+ GtkStyleContextPrivate *priv;
+ GtkStyleProperty *prop;
+ StyleData *data;
+
+ g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), NULL);
+ g_return_val_if_fail (property != NULL, NULL);
+
+ priv = context->priv;
+ g_return_val_if_fail (priv->widget_path != NULL, NULL);
+
+ prop = _gtk_style_property_lookup (property);
+ if (!GTK_IS_CSS_STYLE_PROPERTY (prop))
+ return NULL;
+
+ data = style_data_lookup (context, gtk_style_context_get_state (context));
+ return _gtk_css_computed_values_get_section (data->store, _gtk_css_style_property_get_id (GTK_CSS_STYLE_PROPERTY (prop)));
+}
+
static const GValue *
gtk_style_context_query_func (guint id,
gpointer values)
#define __GTK_STYLE_CONTEXT_H__
#include <glib-object.h>
+#include <gtk/gtkcsssection.h>
#include <gtk/gtkstyleprovider.h>
#include <gtk/gtkwidgetpath.h>
#include <gtk/gtkborder.h>
void gtk_style_context_save (GtkStyleContext *context);
void gtk_style_context_restore (GtkStyleContext *context);
+GtkCssSection * gtk_style_context_get_section (GtkStyleContext *context,
+ const gchar *property);
void gtk_style_context_get_property (GtkStyleContext *context,
const gchar *property,
GtkStateFlags state,